/* Name: Event
 * Author: Cameron Hoerig
 * Date: 5-1-12
 * Description: Each Event holds a priority and an Item. All Events are stored on the PriorityQueues and
 *  call the functions of the Items every frame.
 * Revisions: See Subversion logs at http://code.google.com/p/software-engineering-2012/source/list
 */

public class Event {
	private int priority;
	private Item item; 
	
	// Duplicates a previous event
	public Event(Event event) {
		setPriority(event.getPriority());
		setItem(event.getItem());
	}
	
	// Creates a new event with a certain priority and Item
	public Event(int uPriority, Item pItem) {
		setPriority(uPriority);
		item = pItem;
	}
		
	// allows for creating a pointer to a new Item. After creating an event,
	// this function must be called before placing the event on the queue.
	// Otherwise, the queue will have nothing to execute.
	public void setItem(Item pItem) {item = pItem;}
	
	public void setPriority(int uPriority) {priority = uPriority;}
	public int getPriority() {return priority;}
	public Item getItem() {return item;}
}
